home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1993 December / 1993-12.d64 / right_side ii (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  5KB  |  134 lines

  1. 100 rem copyright 1993 compute publications, intl., ltd. - all rights reserved
  2. 110 gosub1310:rem initialize
  3. 120 gosub990:rem main screen
  4. 130 poke198,0:wait198,1:getg$:g=asc(g$)-132:ifg<1org>5then130
  5. 140 onggosub180,400,700,150,1180:goto120
  6. 150 poke53280,14:poke53281,6:poke53272,(peek(53272)and240)or4
  7. 160 print"[154][147]":end
  8. 170 rem  create file
  9. 180 ps=1:gosub1000:ps=0
  10. 190 printtab(7)"'########################%"
  11. 200 printtab(7)"'[146] [195][210][197][193][212][197] [144][210][146]ight/[211][146]ide file [144] "
  12. 210 printtab(7)"'$$$$$$$$$$$$$$$$$$$$$$$$[144] "
  13. 220 printtab(9)"[144]                        "
  14. 230 poke214,10:print"  [198][146]ile to be read? "bf$;
  15. 240 ln=16:gosub760:f1$=in$:iff1$=""thenreturn
  16. 250 de=63:gosub830:ifen<>63then230
  17. 260 de=0:gosub840:ifen>19then230
  18. 270 poke214,13:print"  [198][146]ile to be created? r/s."mid$(bf$,5,24);
  19. 280 ln=12:gosub760:in$="r/s."+in$:f2$=in$:iff2$="r/s."thenreturn
  20. 290 de=62:gosub830:iff2$=f1$then270
  21. 300 ifde=enthen340
  22. 310 print"[145]  [207][146]verwrite file? [y/n] ";:in=1:gosub760
  23. 320 ifin$<>"y"thenprint"[145]"bl$:goto270
  24. 330 open15,8,15,"s0:"+f2$:close15
  25. 340 poke214,19:printtab(7)"[156][171][171][171][171][171] [195]reating  [198]ile [171][171][171][171][171]"
  26. 350 sa=49152:forl=1to2
  27. 360 open8,8,8,f1$+",s,r":sys sa:sa=49194:close8:next:rem read & convert
  28. 370 open8,8,8,f2$+",s,w":sys49285:close8:rem write to disk
  29. 380 return
  30. 390 rem print file
  31. 400 ps=1:gosub1000:ps=0:np=0
  32. 410 printtab(7)"'#######################%"
  33. 420 printtab(7)"'[146] [208][210][201][206][212] [144][210][146]ight/[211][146]ide [198]ile [144] "
  34. 430 printtab(7)"'$$$$$$$$$$$$$$$$$$$$$$$[144] "
  35. 440 printtab(9)"[144]                       "
  36. 450 poke214,10:print"  [198][146]ile to be printed? r/s."mid$(bf$,5,24);
  37. 460 ln=12:gosub760:in$="r/s."+in$:f1$=in$:iff1$="r/s."thenreturn
  38. 470 de=63:gosub830:ifen<>63then450
  39. 480 de=0:gosub840:ifen>19then450
  40. 490 poke214,13:print"  [197][146]pson or [195][146]ommodore ? [e/c] ";
  41. 500 in=1:ln=1:gosub760:mo$=in$:poke49499,1
  42. 510 ifin$=""thenreturn
  43. 520 ifmo$="e"thenprint"  [206][146]ormal or [200][146]i [196][146]ensity ? [n/h] ";
  44. 530 ifmo$="e"thengosub760:de$=in$:ifde$="h"thenpoke49499,2
  45. 540 ifin$=""thenreturn
  46. 550 open15,4,15:close15:on-(st=0)goto590:ifnp=1thenreturn
  47. 560 open15,4,15:close15:on-(st=0)goto590:ifnp=1thenreturn
  48. 570 poke214,16:print"  [195][146]onnect printer then press a key":gosub960:np=1
  49. 580 poke198,0:wait198,1:getq$:goto550
  50. 590 poke214,17:print"  [156][208][146]ress any key to begin printing ":gosub930
  51. 600 poke198,0:wait198,1
  52. 610 poke214,19:print"[156]  [171][171][171][171][171] [208][210][197][211][211] [211][208][193][195][197][194][193][210][146] [156]to abort [171][171][171][171][171]"
  53. 620 open4,4,7+((mo$="e")*3)
  54. 630 ifmo$="e"thenprint#4,chr$(27)chr$(64)chr$(27)chr$(65)chr$(8):goto650
  55. 640 print#4,chr$(8):rem graphics mode
  56. 650 open 8,8,8,f1$+",s,r":ifmo$="c"thensys49356:close8:close4:goto670
  57. 660 sys49501:close8:open4,4,7: print#4,chr$(27)chr$(64):close4:return
  58. 670 open 4,4,7:print#4,chr$(15):close 4
  59. 680 return
  60. 690 rem directory
  61. 700 print"[147][196][146]irectory"
  62. 710 sys57812"$",8:poke43,1:poke44,48:poke768,174:poke769,167:sys47003,1
  63. 720 poke782,48:sys65493:sys42291:list:poke44,8:poke768,139:poke769,227
  64. 730 print:print"  press any key to return "
  65. 740 poke198,0:wait198,1:return
  66. 750 rem input
  67. 760 cp=0:in$="":gosub930
  68. 770 poke204,0:poke198,0:wait198,1:getq$
  69. 780 ifq$=chr$(20)andcp>0thencp=cp-1:in$=left$(in$,cp):printq$;
  70. 790 ifq$=>" "andq$<="z"andcp<lnthencp=cp+1:in$=in$+q$:printq$;
  71. 800 poke212,0:ifq$<>chr$(13)then770
  72. 810 poke204,1:print"[146] ":return
  73. 820 rem disk check
  74. 830 open15,8,15,"r0:"+in$+"="+in$:close15:goto850
  75. 840 open8,8,8,in$+",s,r":close8
  76. 850 open15,8,15:input#15,en,em$:close15
  77. 860 ifde=enoren<20thenreturn
  78. 870 print"  [129][196][146]isk error: [144]"en;em$:gosub960:poke198,0
  79. 880 forl=0to1500:getq$:ifq$=""thennext
  80. 890 print"[145]"bl$
  81. 900 return
  82. 910 rem sounds
  83. 920 rem bing
  84. 930 pokeat,10:pokesr,73:pokewv,17:pokehf,50:pokell,0
  85. 940 fori=1to333:next:pokewv,16:return
  86. 950 rem buzz
  87. 960 pokehf,5:pokeat,0:pokesr,240:pokewv,33
  88. 970 fori=1to500:next:pokewv,32:return
  89. 980 rem screen
  90. 990 poke53280,3:poke53281,1:poke53272,(peek(53272)and240)or10
  91. 1000 print"[159][147][162][163][162][163][162][163][162][163][162][163][162][163][162][163][162][163][162][163][162][163][162][163][162][163][162][163][162][163][162][163][162][163][162][163][162][163][162][163][162][163]";
  92. 1010 print"[155]----------------------------------------"
  93. 1020 poke214,22:print"[155][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164]";
  94. 1030 print"[159][160][161][160][161][160][161][160][161][160][161][160][161][160][161][160][161][160][161][160][161][160][161][160][161][160][161][160][161][160][161][160][161][160][161][160][161][160][161][160]":poke2023,97
  95. 1040 ifpsthenreturn
  96. 1050 printtab(5)"[144]abcde  [150][167][168][168][168][168][168][168][168][168][168][168][168][168][168][168][169] [146] [144][193][194][195][196][197]"
  97. 1060 printtab(5)"fghij  [165]              [166][144] [146] [198][199][200][201][202]"
  98. 1070 printtab(5)"klmno  [150][165]  [144][210][146]ight/[211][146]ide  [166][144] [146] [203][204][205][206][207]"
  99. 1080 printtab(5)"pqrst  [150][165]              [166][144] [146] [208][209][210][211][212]"
  100. 1090 printtab(5)"uvwxy  [170][171][171][171][171][171][171][171][171][171][171][171][171][171][171][172][144] [146] [213][214][215][216][217]"
  101. 1100 printtab(5)"  z                     [146]   [218]"
  102. 1110 printtab(7)"f 1  [195][146]reate [144][210][146]ight/[211][146]ide file"
  103. 1120 printtab(7)"f 2  [204][207][193][196][146]  [144][195][146]haracter set"
  104. 1130 printtab(7)"f 3  [208][146]rint [144][210][146]ight/[211][146]ide file"
  105. 1140 printtab(7)"f 5  [196][146]isk directory"
  106. 1150 printtab(7)"[198] 7  [209][146]uit program"
  107. 1160 forl=1to5:poke214,4+l*3:printtab(6)"[152][173][174][174][174][175][157][157][157][157][157][176][177][157][157][157][157][157][178][179][179][179][180]":next
  108. 1170 return
  109. 1180 ps=1:gosub1000:ps=0
  110. 1190 printtab(7)"'########################%"
  111. 1200 printtab(7)"'[146] [204][207][193][196]   [144][195][146]haracter [211]et   [144] "
  112. 1210 printtab(7)"'$$$$$$$$$$$$$$$$$$$$$$$$[144] "
  113. 1220 printtab(9)"[144]                        "
  114. 1230 poke214,10:print"[195][146]haracter set to load? "bf$;:ln=16:gosub760
  115. 1240 ifin$=""thenreturn
  116. 1250 in$=left$(in$,16):gosub850:ifen>19then1230
  117. 1260 poke780,0:poke781,8:poke782,0:sys65466
  118. 1270 forl=1tolen(in$):poke849+l,asc(mid$(in$,l,1)):next
  119. 1280 poke780,len(in$):poke781,850and255:poke782,850/256:sys65469
  120. 1290 poke780,0:poke781,0:poke782,40:sys65493:sys49677:return
  121. 1300 rem initialize
  122. 1310 ifb=0thenb=1:dimk(168)
  123. 1320 ifpeek(10240)+peek(49152)=222then1390
  124. 1330 ifa=0thena=1:load"right/side.ml",8,1
  125. 1340 print"[147]setting up...."
  126. 1350 poke56334,0:poke1,51
  127. 1360 poke781,9:poke782,1:poke88,0:poke89,48:poke90,0:poke91,224
  128. 1370 sys41964:poke1,55:poke56334,1
  129. 1380 sys 49677
  130. 1390 lf=54272:hf=54273:wv=54276:at=54277:sr=54278:vl=54296:pokevl,15
  131. 1400 bl$="                                      "
  132. 1410 bf$="                [157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157]"
  133. 1420 return
  134.